package com.hdoit.ares.logical.wechatorder.dao.impl;

import org.springframework.stereotype.Component;

import com.hdoit.ares.logical.wechatorder.dao.IWechatAresOrderDao;
import com.hdoit.ares.logical.wechatorder.model.WechatAresOrder;
import com.tennetcn.common.dao.base.IFinderExpression;
import com.tennetcn.common.dao.base.impl.SuperDao;
import com.tennetcn.common.utils.FinderExpressionFactory;

@Component
public class WechatAresOrderDaoImpl extends SuperDao<WechatAresOrder> implements IWechatAresOrderDao{

	@Override
	public WechatAresOrder queryOrder(String openId, String name) {
		IFinderExpression finderExpression = FinderExpressionFactory.createExpression();
		
		finderExpression.select("*")
						.from(WechatAresOrder.class)
						.andEq("openId",openId)
						.andEq("`name`", name);
		
		return queryModel(finderExpression);
	}

}
